import { axios } from '../utils/axios'
import { IGetCommentsModel, IPostArticle } from './model/articleModel'

enum Apis {
  GetComments = '/comments',
  PostArticle = '/posts'
}

export const getComments = <T>(params: IGetCommentsModel) => axios.get<T>({
  url: Apis.GetComments,
  params: params
})

export const postArticle = (data: IPostArticle) => axios.post({
  url: Apis.PostArticle,
  data: data
})
